<?php
// +----------------------------------------------------------------------
// | quanli team
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2020 http://www.fistforward.com/ All rights reserved.
// +----------------------------------------------------------------------
// | Author: allen.qiang@fistforward.com
// +----------------------------------------------------------------------


/**
 * 推广url功能
 * @package  quanliadmin/app/system
 * @author   allen.qiang@fistforward.com
 */
quanli_require('module/base/system/itemHandler.class.php');
class pa_promote {

	//入口
	public function execute() {

		if (isset($_REQUEST['operFlg']) && quanli_is_int($_REQUEST['operFlg'])) {

            switch ($_REQUEST['operFlg']) {

                case 1:
                    $this->tuiguang();
                    break;
                case 2://显示添加的页面
                	$this->add();
                	break;
                case 3://显示推广URL详细信息
                	$this->promoteList();
                	break;	
                default:
                    backendError();
                    break;

            }

        } else {

            backendError();

        }

	}

    private function tuiguang() {
		
        global $G_PGLOB;
        //实例基础设置类
        $itemHandler = new itemHandler();
        //查询选项
        $args_array = array(
        		'itemCategoryID' => 32
        );
        $item_array = $itemHandler->searchItem($args_array);

		$G_PGLOB->smarty->assign('item_array',$item_array);
        $G_PGLOB->smarty->display('system/promote.tpl');

    }
	//显示增加的页面
	public function add(){
        global $G_PGLOB;
        //实例基础设置类
        $itemHandler = new itemHandler();
        //查询选项
        $args_array = array(
        		'itemCategoryID' => 32
        );
        $item_array = $itemHandler->searchItem($args_array);

		$G_PGLOB->smarty->assign('item_array',$item_array);
		$G_PGLOB->smarty->display('system/promoteAdd.tpl');
		
		
	}
	//显示推广的信息
	public function promoteList(){
		global $G_PGLOB;
		$key = $_GET['key'];
		$G_PGLOB->smarty->assign('key',$key);
		
		$G_PGLOB->smarty->display('system/promoteList.tpl');
		
	}

}